/*
DEDECMS۲v2.53DEDECMS5.3
:keller
QQ:120222008
DEDEȺ:50232071
:2008-12-4
*/

 ʹ÷
	ѹڵļϴDEDEİװĿ¼У
	Ȼں̨SQLУǵҪDEDE滻Ϊ㰲װʱõıǰ׺

CREATE TABLE `#@__mood` (
  `id` int(11) NOT NULL auto_increment,
  `aid` int(11) NOT NULL,
  `mood1` int(10) NOT NULL default '0',
  `mood2` int(10) NOT NULL default '0',
  `mood3` int(10) NOT NULL default '0',
  `mood4` int(10) NOT NULL default '0',
  `mood5` int(10) NOT NULL default '0',
  `mood6` int(10) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;


CREATE TABLE `#@__mood_ranking` (
  `id` int(11) NOT NULL auto_increment,
  `aid` int(10) NOT NULL,
  `mood` int(1) NOT NULL,
  `time` int(11) NOT NULL,
  `ip` varchar(15) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `aid` (`mood`,`aid`,`time`,`ip`)
) ENGINE=MyISAM;




ҳģ</head>ǰ
<script language='javascript' type='text/javascript' src='{dede:global.cfg_cmsurl/}/include/dedeajax2.js'></script>
<script language="javascript">
function mood(){
  var mood_obj = document.getElementById('_mood');
  myajax = new DedeAjax(mood_obj,false,false,"","","");
  myajax.SendGet2("{dede:global name='cfg_phpurl'/}/mood/mood.php?aid={dede:field name='aid'/}&up="+10*Math.random());
  DedeXHTTP = null;
}
function moodGet(mood)
{
  var mood_obj = document.getElementById('_mood');
  myajax = new DedeAjax(mood_obj,false,false,"","","");
  myajax.SendGet2("{dede:global name='cfg_phpurl'/}/mood/mood.php?aid={dede:field name='aid'/}&action=mood&mood="+mood+"&up="+10*Math.random());
  myajax = null;
}
</script>

ȻDedeCMSҳģҪͶƱĵط
<div id="_mood">ͳУ</div>
<script language="JavaScript">mood();</script>

ɡ
HTMLŶ


